﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OverStore.Runtime;
using OverStore.Runtime.OverStoreContext;
using OverStore.TutorialAsTest.UnitTest.Configuration.Mocks;

namespace OverStore.TutorialAsTest.UnitTest.Configuration.Rdbms.InstanceStorage
{
    public class SimpleClass
    {
        private Guid _Id = Guid.NewGuid();

        public Guid ID
        {
            get { return _Id; }
            set { _Id = value; }
        }

        #region Name

        private string _Name;

        public string Name
        {
            get
            {
                return _Name;
            }
            set
            {
                _Name = value;
            }
        }

        #endregion

        #region CreationDate

        private DateTime _CreationDate;

        public DateTime CreationDate
        {
            get
            {
                return _CreationDate;
            }
            set
            {
                _CreationDate = value;
            }
        }

        #endregion

        private SimpleClassType _Type;

        public SimpleClassType Type
        {
            get
            {
                return _Type;
            }
            set
            {
                _Type = value;
            }
        }

        public override bool Equals(object obj)
        {
            SimpleClass result = obj as SimpleClass;
            if (result != null)
                return result.ID.Equals(ID);
            else
                return base.Equals(obj);
        }

        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }

    public enum SimpleClassType
    {
        Default = 0,
        Stub = 1,
        Abstract = 2
    }
}
